<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>05_条件渲染</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <button @click="flag=!flag">切换</button>
        <div v-if="flag">这是用v-if渲染的元素</div>
        <div v-show="flag">这是用v-show渲染的元素</div>
    </div>
    <script>
        const vm = new Vue({
            el:'#app',
            data:{
                flag:true,
            },
        })
    </script>
</body>
</html>